<style type="text/css">
	.nowCarList {
		margin: 0;
		font-size: 14px;
	}
	
	.nowCarList::-webkit-scrollbar {
		display: none;
	}
	
	.nowCarList li {
		height: 30px;
		line-height: 30px;
		border-bottom: 1px solid #cccccc;
	}
	
	.nowCarList li:hover {
		background: #eee;
		/*border-bottom-color: #1E90FF;*/
	}
</style>
<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['围栏管理','进出围栏统计']" icon="fa fa-map-marker" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>

	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>进出围栏统计</h2>
				</header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn railHtml">
								<div class="top_module">
									<span class="module_text">公司名称</span>
									<sa-company-tree companyTreeId="companyTree" (companySelected)="companySelected($event)"></sa-company-tree>
								</div>

								<div class="selectDate top_module">
									<div class="input-daterange input-group s_selected_time_box s_hover_box">
										<input type="text" [(ngModel)]='startTime' class="form-control s_selected_time" id="datetimepicker1"  autocomplete="off" placeholder="选择开始时间"/>
										<span class="s_selected_time_spe">至</span>
										<input type="text" [(ngModel)]='endTime' class="form-control s_selected_time" id="datetimepicker2"  autocomplete="off" placeholder="选择结束时间"/>
										<div class="s_del_icon" (click)='del_date()'>x</div>
									</div>
								</div>

								<div class="top_module">
									<span class="module_text">围栏名称</span>
									<input class="module_inp" type="text" [(ngModel)]="railName" />
								</div>

								<!--<div class="top_module">
									<span class="module_text">站点类别</span>
									<select name="" id="" class="module_inp" [(ngModel)]="siteType">
										<option value="1">装卸点</option>
										<option value="">2</option>
									</select>
								</div>-->

								<!--<div class="top_module">
									<span class="module_text">标注名称</span>
									<select name="" id="" class="module_inp" [(ngModel)]="taggingName">
										<option value="1">xxx标注</option>
										<option value="">2</option>
									</select>
								</div>-->

								<button type="button" class="btn btn-primary" (click)="table_search()">查询</button>
							</div>
						</div>
						<div class="table_scroll">
							<table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>围栏名称</th>
										<th>标注类别</th>
										<th>进厂车次</th>
										<th>离厂车次</th>
										<th>装载量[吨]</th>
										<th>当前在场车辆</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData">
										<td>{{row.name}}</td>
										<td>{{row.typeId}}</td>
										<td>{{row.enterNumber}}</td>
										<td>{{row.leaveNumber}}</td>
										<td>{{row.weight}}</td>

										<td>
											<span>{{row.nowAmount}}辆  </span>
											<button type="button" (click)="showNowCar(row,positionModal)"> 	点击查看</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
							</paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>

	<!-- 在场车辆 弹窗-->
	<section bsModal #positionModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" (click)="hideNowCar(positionModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">在场车辆</h4>
				</div>
				<div class="modal-body" style="height: 280px;overflow: auto;">
					<div class="row form-horizontal">
						<ul class="nowCarList">
							<li *ngFor='let item of nowCarlist;let i=index'[ngClass]="{activeName: item.id === activeName}" >
								{{i+1}}、 {{item.carNumber}} --- {{item.status}} <span (click)="jumpRailDetail(item.carNumber)" class="right" style="color:#1A6DDD;margin-right: 24px;padding: 0 12px;cursor: pointer;">查看明细</span>
							</li>
						</ul>
					</div>
				</div>
			</div>
		</div>
	</section>
	<!-- 在场车辆 弹窗-->

</div>